<template>
<div class="hello">
<div class="navbar">
  <el-menu
    :default-active="$route.path"
    class="menu"
    router
    @open="handleOpen"
    @close="handleClose">
    <div style="background-color: lightblue;width: 100%;height: 50px"></div>
    <el-menu-item index="/" class="item">
      <template slot="title" style="">
        <i class="el-icon-location" style="font-size: 28px;color: black"></i>
        <span style="font-size: 25px;font-weight: bold">词汇汇总</span>
      </template>
    </el-menu-item>
    <div style="width: 100%;height: 30px"></div>
    <el-menu-item index="/sentence" class="item">
      <i class="el-icon-menu" style="font-size: 28px;color: black"></i>
      <span slot="title" style="font-size: 25px;font-weight: bold">课文例句</span>
    </el-menu-item>
    <div style="width: 100%;height: 30px"></div>
    <el-menu-item index="/proverb" class="item">
      <i class="el-icon-document" style="margin-left: -45px;font-size: 28px;color: black"></i>
      <span slot="title" style="font-size: 25px;font-weight: bold">俗语</span>
    </el-menu-item>
    <div style="width: 100%;height: 30px"></div>
    <el-menu-item index="/grammar" class="item">
      <i class="el-icon-setting" style="font-size: 28px;margin-left: -45px;color: black"></i>
      <span slot="title" style="font-size: 25px;font-weight: bold">语法</span>
    </el-menu-item>
  </el-menu>
</div>
</div>
</template>

<script>
  export default {
    name: 'navbar'
  }
</script>

<style scoped>
html,body,.hello,.navbar{
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
}
.menu{
  width: 15%;
  height: 100%;
  background-color: lightblue;
}
.item{
  height: 80px;
  padding-top: 15px;
}
.el-menu-item.is-active{
  background-color: white !important;
  color: black;
}
.item:hover {
    background-color: white !important;
}
</style>
